#!/usr/bin/env python
# -*- coding: utf-8 -*-

# @Time     :2022/03/04
# @Author   :Changshu
# @File     :Exercise10.py
# 11. 盛最多水的容器

class Solution:
	def maxArea(self, height: list) -> int:
		res = -1
		i, j = 0, len(height) - 1
		while i < j:
			res = max(res, min(height[i], height[j]) * (j - i))
			if height[i] <= height[j]:
				i += 1
			else:
				j -= 1
		return res
